import request from '@/utils/request'

// 新增抽题容器
export function addContainer(paperId, titleId) {
    return request({
        url: '/exam/containerPaper/createContainer/' + paperId + '/' + titleId,
        method: 'post'
    })
}

// 删除抽题容器
export function delContainer(containerId) {
    return request({
        url: '/exam/containerPaper/removeContainer/' + containerId,
        method: 'post'
    })
}

// 获取抽题容器题目
export function getContainerTopic(containerId,data) {
  return request({
    url: '/exam/containerPaper/getContainerTopic/' + containerId,
    method: 'get',
    params:data
  })
}

// 新增抽题容器题目
export function addContainerTopic(data) {
    return request({
        url: '/exam/containerPaper/addTopic/' + data.containerId,
        method: 'post',
        data: data,
    })
}

// 勾选抽题容器题目
export function choiceContainerTopic(containerId, topicIds) {
    return request({
        url: '/exam/containerPaper/choiceTopic/' + containerId + '/' + topicIds,
        method: 'post',
    })
}

// 删除抽题容器题目
export function delContainerTopic(containerId, topicIds) {
    return request({
        url: '/exam/containerPaper/removeContainerTopic/' + containerId + '/' + topicIds,
        method: 'post',
    })
}

//根据容器id获取容器信息
export function getContainerById(containerId) {
    return request({
        url: '/exam/containerPaper/getContainerById/' + containerId,
        method: 'get',
    })
}

//抽题容器修改不限难度题目数量
export function updateContainerUnlimitedNum(containerId, unlimitedNum) {
    return request({
        url: '/exam/containerPaper/updateContainerUnlimitedNum/' + containerId + '/' + unlimitedNum,
        method: 'post',
    })
}

//抽题容器修改简单难度题目数量
export function updateContainerEasyNum(containerId, easyNum) {
    return request({
        url: '/exam/containerPaper/updateContainerEasyNum/' + containerId + '/' + easyNum,
        method: 'post',
    })
}

//抽题容器修改中等难度题目数量
export function updateContainerNormalNum(containerId, normalNum) {
    return request({
        url: '/exam/containerPaper/updateContainerNormalNum/' + containerId + '/' + normalNum,
        method: 'post',
    })
}

//抽题容器修改困难难度题目数量
export function updateContainerHardNum(containerId, hardNum) {
    return request({
        url: '/exam/containerPaper/updateContainerHardNum/' + containerId + '/' + hardNum,
        method: 'post',
    })
}

//抽题容器分数修改
export function updateContainerScore(containerId, score) {
    return request({
        url: '/exam/containerPaper/updateContainerScore/' + containerId + '/' + score,
        method: 'post',
    })
}



